<!DOCTYPE html>
<html lang="en">
<include file="Public/header" title="制度修改" keywords="社团管理系统，常州大学，课程设计" />

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div method="get" class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">身份证</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="idcard">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">学号</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentid">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentname">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否预报</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="forecast" value="{$res['forecast']}">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="studentsex" value="{$res['studentsex']}">
                            		<option value="男" >男</option>
                            		<option value="女" >女</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">电话号码</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="studentnumber">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宿舍等级</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="dormitorygrade">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">宿舍号</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="dormitory" value="{$res['dormitory']}">                           	
                            		<volist name="dormitory" id="val">
                                            <option value="{$val.dormitory}">{$val.dormitory}</option>
                                    </volist>
                            	</select>
<!--                                <input type="text" class="form-control" value="{$res['dormitory']}" id="dormitory">-->
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否报到</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="report" value="{$res['report']}">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">家庭住址</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="address">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否有病史</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="sick" value="{$res['sick']}">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">贫困证明</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control"  id="prove">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否购买保险费</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="insurance" value="{$res['insurance']}">
                            		<option value="0" >否</option>
                            		<option value="1" >是</option>
                            	</select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">班级名称</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="classname" value="{$res['classname']}">                           	
                            		<volist name="class" id="val">
                                            <option value="{$val.classname}" >{$val.classname}</option>
                                    </volist>
                            	</select>
                               <!-- <input type="text" class="form-control" value="{$res['classname']}" id="classname">-->
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">专业名称</label>
                            <div class="col-sm-10">
                            	<select class="form-control" id="spename" value="{$res['spename']}">             	
                            		<volist name="spe" id="val">
                                            <option value="{$val.spename}">{$val.spename}</option>
                                    </volist>
                            	</select>

                            </div>
                        </div>
                        <button id="subbtn" class="btn btn-w-m btn-info" type="button" data-id="{$res['idcard']}">确认提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<include file="Public/footer"/>
<script>
    $('#subbtn').on('click',function () {
        var btn = $(this);
        var idcard = $('#idcard').val();
        var studentid = $('#studentid').val();
        var studentname = $('#studentname').val();
        var forecast = $('#forecast').val();
        var studentsex = $('#studentsex').val();
        var studentnumber = $('#studentnumber').val();
        var dormitorygrade = $('#dormitorygrade').val();
        var dormitory = $('#dormitory').val();
        var report = $('#report').val();
        var address = $('#address').val();
        var sick = $('#sick').val();
        var prove = $('#prove').val();
        var insurance = $('#insurance').val();
        var classname = $('#classname').val();
        var spename = $('#spename').val();
        var param = {
        	idcard:idcard,
            studentid:studentid,
            studentname:studentname,
            studentsex:studentsex,
            forecast:forecast,
            report:report,
            studentnumber:studentnumber,
            dormitorygrade:dormitorygrade,
            dormitory:dormitory,
            address:address,
            sick:sick,
            prove:prove,
            insurance:insurance,
            classname:classname,
            spename:spename
        };
        console.log(param);
        var url = "{:U('Departadmin/addstudent')}";
        $.ajax({
            url: url,
            data: param,
            dataType: 'json',
            type: 'post',
            success: function (data) {
                alert(data.info);
                if (data.status == 1) {
                }
            },
            error: function () {
                alert('操作失败');
            }
        })
    })
</script>
</html>